/*
 * Copyright (c) 2016 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.serv.shop.api;

import com.jnzc.ocr.common.bean.PageResult;
import com.jnzc.ocr.serv.shop.entity.ShopMarketingPlan;
import com.jnzc.ocr.serv.shop.filter.ShopMarketingPlanFilter;
import com.jnzc.ocr.serv.shop.vo.ShopMarketingPlanSelectResultVo;
import com.jnzc.ocr.serv.shop.vo.ShopMarketingPlanSelectVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author zhangcm
 * @version 1.0, 2017/9/13
 */
@FeignClient("serv-shop")
@RequestMapping("/shopMarketingPlanApi")
public interface ShopMarketingPlanApi {

    @PostMapping("/find")
    ShopMarketingPlan find(@RequestParam("id") Long id, @RequestParam("shopId") Long shopId);

    @PostMapping("/search")
    PageResult<ShopMarketingPlan> search(@RequestBody ShopMarketingPlanFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);

    @PostMapping("/save")
    ShopMarketingPlan save(@RequestBody ShopMarketingPlan obj);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id, @RequestParam("shopId") Long shopId);

    @PostMapping("/selectPlan")
    Map<String, ShopMarketingPlanSelectResultVo> selectPlan(@RequestBody ShopMarketingPlanSelectVo selectVo, @RequestParam("shopId") Long shopId);
}
